home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / docs / misc / timings.lha / Timings / Text / 68881.doc < prev   
Encoding:
Text File  |  1997-08-08  |  7.6 KB  |  214 lines

  1. All timings are for cache case and two-clock reads and writes.
  2.  
  3. Effective Address Calculations Execution Timing
  4. Addressing Mode        cea
  5. Dn                       0
  6. An                       0
  7. (An)                     6
  8. (An)+                    6
  9. -(An)                    6
  10. (d16,An)                 2 !
  11. xx.W                     2
  12. xx.L)                    4
  13. #data                    0
  14. (d8,An,Xn)               4 !
  15. (d16,An,Xn)              6 !
  16. (B)                      6
  17. (d16,B)                  8
  18. (d32,B)                 14
  19. ([B],I)                 11
  20. ([B],I,d16)             11
  21. ([B],I,d32)             13
  22. ([d16,B],I)             13
  23. ([d16,B],I,d16)         13
  24. ([d16,B],I,d32)         15
  25. ([d32,B],I)             19
  26. ([d32,B],I,d16)         19
  27. ([d32,B],I,d32)         21
  28.  
  29. (!) An could be replaced by PC
  30. B = Base address: 0, An, PC, Xn, An+Xn, PC+Xn
  31. I = Index:        0, Xn
  32. Note that Xn cannot be in B and I at the same time. Scaling
  33. and size of Xn does not affect timing.
  34.  
  35. Instruction           clocks  function
  36. FABS                     35   absolute value
  37. FACOS                   625   arc cosine
  38. FADD                     51 ! add
  39. FASIN                   581   arc sine
  40. FATAN                   403   arc tangent
  41. FATANH                  693   hyperbolic arc tangent
  42. FCMP                     33 ! compare
  43. FCOS                    391   cosine
  44. FCOSH                   607   hyperbolic cosine
  45. FDIV                    103 ! divide
  46. FETOX                   497   e to the x power
  47. FETOXM1                 545   e to the x power minus 1
  48. FGETEXP                  45   get exponent
  49. FGETMAN                  31   get mantissa
  50. FINT                     55   integer part
  51. FINTRZ                   55   integer part, round to zero
  52. FLOGN                   525   logarithm base e
  53. FLOGNP1                 571   logarithm base e of x+1
  54. FLOG10                  581   logarithm base 10
  55. FLOG2                   581   logarithm base 2
  56. FMOD                     67 ! modulo
  57. FMOVE to FPn             33   move
  58. FMUL                     71 ! multiply
  59. FNEG                     35   negate
  60. FREM                     67 ! remainder
  61. FSCALE                   41 ! scale exponent
  62. FSGLDIV                  69 ! single precision divide
  63. FSGLMUL                  59 ! single precision multiply
  64. FSIN                    391   sine
  65. FSINCOS                 451   simultaneous sine and cosine
  66. FSINH                   687   hyperbolic sine
  67. FSQRT                   107   square root
  68. FSUB                     51 ! subtract
  69. FTAN                    473   tangent
  70. FTANH                   661   hyperbolic tangent
  71. FTENTOX                 567   10 to the x power
  72. FTST                     33   test
  73. FTWOTOX                 567   2 to the x power
  74.  
  75. (!): dyadic operation
  76.  
  77. Source:
  78.        FPm              + 0
  79.        Mem, Integer     +27+cea (+2, if !)
  80.        Mem, Single      +19+cea (+2, if !)
  81.        Mem, Double      +25+cea (+2, if !)
  82.        Mem, Extended    +23+cea (+2, if !)
  83.        Mem, Packed BCD +837+cea
  84. If source is a MC68020 data register, subtract 5 clocks.
  85.  
  86. Addressing modes allowed:
  87. monadic: FSIN.<fmt> EA,FPn
  88.          FSIN.x     FPm,FPn
  89.          FSIN.x     FPn
  90.  
  91. dyadic:  FADD.<fmt> EA,FPn
  92.          FADD.x     FPm,FPn
  93.  
  94. FMOVE to Memory:
  95. Destination     Integer Single Double Extended  Packed
  96. FMOVE             100     80     86      72      1996 (?)
  97. If destination is a MC68020 data register, subtract 2 clocks.
  98.  
  99.  
  100. FMOVE control register & FMOVEM
  101.  
  102.                         clocks
  103. FMOVE FPcr,Rn           31
  104. FMOVE FPcr,EA           33+cea
  105. FMOVE Rn,FPcr           28
  106. FMOVE EA,FPcr           33+cea
  107. FMOVE #data,FPcr        30
  108.  
  109. FMOVEM FPcr_list,EA     27+6n+cea
  110. FMOVEM EA,FPcr_list     27+6n+cea
  111. FMOVEM #data,FPcr_list  25+6n
  112.  
  113. FMOVEM FPdr_list,EA     37+25n+cea      (always Extended)
  114. FMOVEM EA,FPdr_list     35+23n+cea      (always Extended)
  115. FMOVEM Dn,EA            51+25n+cea      (Dn contains register list)
  116. FMOVEM EA,Dn            49+23n+cea      (Dn contains register list)
  117.  
  118. Conditional instructions execution timing
  119.  
  120. FBcc                    20/18           (taken/not taken)
  121. FDBcc                   20/24           (expired/not expired)
  122. FNOP                    18
  123. FScc                    18/22/20+cea    (Dn/(An)+/Mem)
  124. FTRAPcc                 18/20/22        (-/.W/-L) (+21, if trap)
  125.  
  126. FRESTORE                21-314
  127. FSAVE                   16-554
  128.  
  129.  
  130. Constant ROM
  131.  
  132. FMOVECR #num,FPm        29 clocks       move constant from ROM to register
  133.  
  134. number    value                     content
  135.  $00      3.1415926535897931        pi
  136.  $01-$0a  invalid                   undefined
  137.  $0b      3.0102999566398114E- 01   log10(2)
  138.  $0c      2.7182818284590450        e
  139.  $0d      1.4426950408889633        log2(e)
  140.  $0e      4.3429448190325181E- 01   log10(e)
  141.  $0f      0.0000000000000000        0
  142.  $10-2f   invalid                   undefined
  143.  $30      6.9314718055994528E- 01   ln(2)
  144.  $31      2.3025850929940454        ln(10)
  145.  $32      1.0000000000000000        10^0
  146.  $33      1.0000000000000000E  01   10^1
  147.  $34      1.0000000000000000E  02   10^2
  148.  $35      1.0000000000000000E  04   10^4
  149.  $36      1.0000000000000000E  08   10^8
  150.  $37      1.0000000000000000E  16   10^16
  151.  $38      9.9999999999999987E  31   10^32
  152.  $39      9.9999999999999987E  63   10^64
  153.  $3a      9.9999999999999988E 127   10^128
  154.  $3b      9.9999999999999986E 255   10^256
  155.  $3c      9.9999999999999997E 511   10^512
  156.  $3d      overflow                  10^1024
  157.  $3e      overflow                  10^2048
  158.  $3f      overflow                  10^4096
  159.  
  160. Packed BCD
  161.  
  162. The FMOVE.P command reads or writes a 96-bit Packed Decimal Real.
  163. The following bits are used:
  164.   bit number    content
  165.         95      sign of mantissa
  166.         94      sign of exponent
  167.      93/92      unused
  168.      91-80      3-digit exponent
  169.      79-67      zero, unless a binary-to-decimal conversion overflow occurs
  170.      66- 0      17-digit mantissa
  171.  
  172. The numbers can be output from the coprocessor in a format readily
  173. used for printing by a program. For example:
  174.         FMOVE.P fp3,Buffer{#5}
  175.  converts the floating-point data register content into a packed BCD
  176. string with five digits to the right of the decimal point.
  177.  
  178.  
  179. Optimisations for the 68882
  180.  
  181. The 68882 is somewhat optimised in hardware. There is a independent
  182. conversion unit implemented to convert binary real formats (Single,
  183. Double or Extended), when loaded from or stored in memory. The
  184. FP-register are dual-ported.
  185. Because of that, the 68882 can do some work in parallel.
  186. - When the '882 receives an instruction, it can initiate the instruc-
  187.   tion, fetch the necessary operands, and convert them to the internal
  188.   extended format even though the Arithmetic Unit is busy completing
  189.   execution of a previous instruction.
  190. - For binary real formats exist optimized FMOVE instructions. These
  191.   FMOVE execute twice as fast as the corresponding FMOVE of the '881.
  192.   The FMOVE are also potentially fully concurrent and, therfore, can
  193.   be completely executed during the execution of a previous instruction.
  194. - The '882 has a more optimized coprocessor interface than the '881.
  195.   If an arithmetic instruction has data formats of Single, Double or
  196.   Extended, the dialogs are designed to increase the potential overlap
  197.   with subsequent instructions. This overlap can significantly decrease
  198.   the effective instruction execution time.
  199.  
  200. Warnings:
  201. The FSAVE-command of the '882 needs 32 bytes more space than the '881.
  202. If you need FPU-instructions inside an interrupt-handler, you have to
  203. use a FSAVE before any other FPU-instruction and therefore a FRESTORE
  204. before the RTE-instruction.
  205.  
  206. Suggested optimisations:
  207. - use Single, Double or Extended formats
  208. - avoid conflicting registers to start the next command faster
  209. - use fast FMOVE-command after fast and slow FMOVEs
  210.   after slow calculations
  211. - for iterations: do two iterations per loop to avoid register-
  212.   conflicts
  213.  
  214.